package exception;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;

public class ThrowsDemo {
    public void doSome() throws IOException, AWTException {
    }

}

class SubClass extends ThrowsDemo {

    // public void doSome() throws IOException, AWTException {}
    //继承允许不在抛出任何异常
    // public void doSome(){}
    //允许仅抛出部分异常
    //public void doSome() throws IOException { }
    //允许抛出潮流方法抛出异常的子类型异常
    //public void doSome() throws FileNotFoundException {}

    //不允许抛出额外异常
    //public void doSome()throws SQLException{}
    //不允许抛出超出超类型异常范围的异常
    //public void doSome()throws Exception{}
}
